/**
 * 
 */
package com.oet.persistence.operator;

import javax.persistence.EntityManager;

import com.oet.persistence.entity.Course;
import com.oet.persistence.entity.CourseFile;
import com.oet.persistence.entity.CourseSeries;
import com.oet.persistence.entity.Customer;
import com.oet.persistence.entity.Teacher;
import com.oet.persistence.entity.UserComment;
import com.oet.persistence.entity.UserPlannedCourse;
import com.persistence.template.EntityOperator;


/**
 * @author y140zhan
 *
 */
public class UserPlannedCourseEntity extends EntityOperator<UserPlannedCourse> {
	
	public UserPlannedCourseEntity(EntityManager em)
	{
		setEntityManager(em);
		validate();
		getInstance();
	}
	
	public UserPlannedCourseEntity(EntityManager em, Object id)
	{
		setEntityManager(em);
		validate();
		getInstance();
		loadInstance(id);
	}
	
	public UserPlannedCourse loadEntity(Object id)
	{
		return loadInstance(id);
	}
	
	public String remove()
	{
		UserPlannedCourse instanceTemp = getInstance();
		getEntityManager().refresh(instanceTemp);

		return super.remove();
	}

}
